﻿<Window x:Class="Mengsk.Device.Devices.UI.DeviceMethodCaller"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="方法调用测试" Height="600" Width="800" Loaded="Window_Loaded">
    <Grid Margin="3">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ComboBox Grid.Column="0" VerticalAlignment="Center" Name="cbbMethods" Margin="3" SelectionChanged="cbbMethods_SelectionChanged"/>
            <Button Grid.Column="1" Name="btnExecute" Content="执行" VerticalAlignment="Center" Margin="3" Width="60" Click="btnExecute_Click"/>
        </Grid>
        <TextBlock Grid.Row="1" VerticalAlignment="Center" Margin="3" Text="请输入参数值，对于数组请使用 ',' 分割，系统暂时不支持object类型参数."/>

        <DataGrid Grid.Row="2" AutoGenerateColumns="False" Margin="3" Name="dgParameters" SelectionMode="Extended" SelectionUnit="CellOrRowHeader" MinHeight="50">
            <DataGrid.Columns>
                <DataGridTextColumn Width="Auto" Header="名称" Binding="{Binding Parameter.Name}" IsReadOnly="True"/>
                <DataGridTextColumn Width="Auto" Header="类型" Binding="{Binding Parameter.ParameterType}" IsReadOnly="True"/>
                <DataGridTextColumn Width="150" Header="参数值" Binding="{Binding Value,Mode=TwoWay,UpdateSourceTrigger=LostFocus}"/>
                <DataGridTextColumn Width="*" Header="描述" Binding="{Binding Description}" IsReadOnly="True"/>
            </DataGrid.Columns>
        </DataGrid>
        <TextBox Grid.Row="3"  Margin="3" Name="tbMessage"/>

    </Grid>
</Window>
